/**
 * @desc
 *  组件块定义
 * @使用场景
 *
 * @author  杨晓东[of1081]
 * @company qianmi.com
 * @Date    15/9/17
 **/
import React  from 'react';
import Immutable  from 'immutable';

import {BasicEditDialog,ImageLink,TextLink,TextLong,TextShort} from 'x-site-integrate';
import {componentsEditCreate} from 'x-site-integrate';

function MiTop_B_Bar() {
}

/**
 * 默认属性
 * @type {{placeholder: string, name: string, className: string}}
 */
MiTop_B_Bar.prototype.previewImage="/images/bar/mi-top-bar.png";
MiTop_B_Bar.prototype.undeletable = true;//不可删除
MiTop_B_Bar.prototype.isCommonHeader = true;//不可删除
MiTop_B_Bar.prototype.defaultProps = {
	widgetName:"小米－顶部栏",
	props:{
		items:[
			{href:"",title:"笛莎公主商城首页"},
			{href:"",title:"笛莎官网"},
			{href:"",title:"加入收藏"},
			{href:"",title:"客服"},
			{href:"",title:"多看阅读"},
			{href:"",title:"云服务"},
			{href:"",title:"问题反馈"},
			{href:"",title:"Select Region"}
		]
	}
};

/**
 * 编辑此组件最基本的信息，eg,图片，文本　图片＋link 文本＋link
 */
MiTop_B_Bar.prototype.editBasicData=(storeProps)=>{
	//筛选出所有的item
	let addMax = 10;
	let addType = "TextLink";
	let items = storeProps.get('props').get('items');
	let editContents = componentsEditCreate(items,addType);
	return  <BasicEditDialog addMax="10" addType="TextLink" showPic="http://oss-hz.qianmi.com/x-site/public/img/dialog/sketchMap_nav.jpg">
		{editContents}
	</BasicEditDialog>;
}

__XSite_widgetInject(MiTop_B_Bar);
